<template>
	<view :class="config.style">
		<view class="custom-text">
			<view class="item">
				<rich-text :nodes="params.content"></rich-text>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		name: 'CustomText',
		props: {
			title: {
				type: String,
				default: '自定义文本'
			},
			type: {
				type: String,
				default: 'custom_text',
			},
			params: {
				type: Object,
				default: {},
			},
			config: {
				type: Object,
				default: {},
			},
		},
		created() {
			//console.log(JSON.stringify(this.params))
		},
		data() {
			return {
				nodes: [{
					name: 'div',
					attrs: {
						class: 'div-class',
						style: 'line-height: 60px; color: red; text-align:center;'
					},
					children: [{
						type: 'text',
						text: 'Hello&nbsp;uni-app!'
					}]
				}],
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
	
	.custom-text {
		margin: 0;
		.item {
			padding: 20rpx;
		}
	}
</style>
